package com.daoeping.dao;

import com.daoeping.data.Usr_userbasicinfo;

import java.util.List;
import org.hibernate.LockMode;
import org.hibernate.Query;
import static org.hibernate.criterion.Example.create;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;



public class Usr_userbasicinfoDAO extends AllDaoSupport {
	
	public List<Usr_userbasicinfo> findUsr_userbasicinfoList(){
		String hql = "from Usr_userbasicinfo";
		return (List<Usr_userbasicinfo>) this.selectDataByHQL(hql);
	}
	
	public List<Usr_userbasicinfo> findUsr_userbasicinfoById(int id){
		String hql = "from Usr_userbasicinfo where id =" + id;
		return (List<Usr_userbasicinfo>) this.selectDataByHQL(hql);
	}
	
	public List<Usr_userbasicinfo> findUsr_userbasicinfoByUserId(int user_id){
		String hql = "from Usr_userbasicinfo where user_id =" + user_id + "order by id desc";
		return (List<Usr_userbasicinfo>) this.selectDataByHQL(hql);
	}
}